package com.campusexpresspickup.service.impl;

import com.campusexpresspickup.entity.OauthRole;
import com.campusexpresspickup.service.IOauthUserRoleService;
import com.campusexpresspickup.entity.OauthUserRole;
import com.campusexpresspickup.mapper.OauthUserRoleMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lq
 * @since 2021-11-15
 */
@Service
public class OauthUserRoleServiceImpl extends ServiceImpl<OauthUserRoleMapper, OauthUserRole> implements
    IOauthUserRoleService {

  private final OauthUserRoleMapper oauthUserRoleMapper;

  public OauthUserRoleServiceImpl(OauthUserRoleMapper oauthUserRoleMapper) {
    this.oauthUserRoleMapper = oauthUserRoleMapper;
  }

  @Override
  public List<OauthRole> getRoleListByUserId(Integer userId) {
    return oauthUserRoleMapper.getRoleList(userId);
  }
}
